package com.qulai.amazon_us.service.amazon_us.impl;

import java.util.List;

import com.qulai.amazon_us.domain.amazon_us.AmazonUsPost;
import com.qulai.amazon_us.mapper.amazon_us.AmazonUsPostMapper;
import com.qulai.amazon_us.service.amazon_us.IAmazonUsPostService;
import com.qulai.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 上传POSTService业务层处理
 * 
 * @author hunan
 * @date 2025-03-06
 */
@Service
public class AmazonUsPostServiceImpl implements IAmazonUsPostService
{
    @Autowired
    private AmazonUsPostMapper amazonUsPostMapper;

    /**
     * 查询上传POST
     * 
     * @param id 上传POST主键
     * @return 上传POST
     */
    @Override
    public AmazonUsPost selectAmazonUsPostById(Long id)
    {
        return amazonUsPostMapper.selectAmazonUsPostById(id);
    }

    /**
     * 查询上传POST列表
     * 
     * @param amazonUsPost 上传POST
     * @return 上传POST
     */
    @Override
    public List<AmazonUsPost> selectAmazonUsPostList(AmazonUsPost amazonUsPost)
    {
        return amazonUsPostMapper.selectAmazonUsPostList(amazonUsPost);
    }

    /**
     * 新增上传POST
     * 
     * @param amazonUsPost 上传POST
     * @return 结果
     */
    @Override
    public int insertAmazonUsPost(AmazonUsPost amazonUsPost)
    {
        amazonUsPost.setCreateTime(DateUtils.getNowDate());
        return amazonUsPostMapper.insertAmazonUsPost(amazonUsPost);
    }

    /**
     * 修改上传POST
     * 
     * @param amazonUsPost 上传POST
     * @return 结果
     */
    @Override
    public int updateAmazonUsPost(AmazonUsPost amazonUsPost)
    {
        amazonUsPost.setUpdateTime(DateUtils.getNowDate());
        return amazonUsPostMapper.updateAmazonUsPost(amazonUsPost);
    }

    /**
     * 批量删除上传POST
     * 
     * @param ids 需要删除的上传POST主键
     * @return 结果
     */
    @Override
    public int deleteAmazonUsPostByIds(Long[] ids)
    {
        return amazonUsPostMapper.deleteAmazonUsPostByIds(ids);
    }

    /**
     * 删除上传POST信息
     * 
     * @param id 上传POST主键
     * @return 结果
     */
    @Override
    public int deleteAmazonUsPostById(Long id)
    {
        return amazonUsPostMapper.deleteAmazonUsPostById(id);
    }
}
